colinuxfandomcom-20200214-history
Raid solution
NOTE: The title of this document is incorrect. FAT32 has a maximum file size of 4GB. I think that the author must have confused the 2GB limitation of vfat on Linux. NOTE-II: the 2GB limit on Linux is no more, at least it has been fixed in the kernel 2.6.x in recent versions. There still may be troublemaker software. Requirements: * Debian root image with internet connectivity * 2gb blank image file for Gentoo * Up to 6 (maximum) blank image files as needed to make the install you want * 256MB+ of swap space (highly recommended) * 64MB ram assigned to coLinux = Debian Setup = In this example: * /dev/cobd0 will be debian * /dev/cobd1 will be the image you choose for gentoo * /dev/cobd4 wil be swap Boot debian. Install Gentoo to /dev/cobd1 In the Gentoo Installation guide you will be starting from creating the filesystem. Gentoo setup specifics Kernel source Install vanilla-sources-2.4.24 (or whatever the latest colinux supported kernel is) * USE="-*" emerge /usr/portage/sys-kernal/vanilla-sources/vanilla-sources-2.4.24.ebuild Editing fstab: * set swap to /dev/cobd7 * set root to /dev/cobd6 Prepare for the Gentoo environment Backup the xml config file as debian.xml Some naming conventions for this part. I named my array files cobd0,cobd1.... cobd5 (hence, I had 6 of them) now edit the config file and set (as necessary) : device 0 -> cobd0 : device 1 -> cobd1 : ........ : device 5 -> cobd5 : device 6 -> gentoo image (that's why we set gentoo to boot from cobd6) : device 7 -> swap verify memory is 64 megs or more. Boot Gentoo Your Gentoo image should boot ok. This is where you should complete your Gentoo setup. If you are having problems consult me (s0be) on irc and I can try to help you out. NOW, we need to set up a environment conducive to configuring our real install. You will need: # samba # mdadm # appropriate filesystem tools (if you choose not to use ext3) # colinux source (for the kernel patches) so you should do: USE="-*" emerge samba mdadm When that is finished, grab the colinux source and uncompress it into /usr/src go into /usr/src/linux-2.4.24 and patch the sources with the latest colinux patch. Kernel Configuration patch -p1 --dry-run < ../colinux-/patch/linux if it all succeeds, (no patch fails), do it without --dry-run now, copy the config file out of the colinux source cp ../colinux-/conf/linux-config ./.config now, make oldconfig make oldconfig now, make menuconfig make menuconfig some key points to enable: * /dev filesystem support ** mount/devfilesystematboot * raid support (compiled in, not mudles) ** allraidlevels * ext3(or any filesystems you want to use, built in) * smbfs and nfs built in now, make the kernel image. make dep make clean make vmlinux once that finishes, you need to getthekernelimageoutofcolinux. reboot gentoo with that new kernel. Creating a raid use mdadm to create the span of cobd0->cobd5 mdadm --create --verbose /dev/md0 --level=linear --raid-devices=6 /dev/cobd{0,1,2,3,4,5} (using bash list scripting) now, we need to create a /etc/mdadm.conf: mdadm --detail --scan > /etc/mdadm.conf which needs one more line added to list devices... nano -w /etc/module.conf add: DEVICE /dev/cobd0 /dev/cobd1 /dev/cobd2 /dev/cobd3 /dev/cobd4 /dev/cobd5 as the first line. Using the raid Make the filesystem mkfs.ext3 /dev/md0 mount the filesystem mount /dev/md0 /mnt/gentoo return to gentoooncoLinux and do your real install in this /mnt/gentoo system. make sure to emerge samba again and mdadm again. copy over mdadm.conf. once the install is complete, you'll need to edit the config file one last time, to change the root= line to root=/dev/md0 it should 'just work now' any problems/corrections, e-mail paterley@drunkencodepoets.com ----MassTranslated on Sun Apr 23 17:36:43 UTC 2006 ----ManuallyAdjusted on 20 July 2008